package com.ruoyi.teacher.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teacher.mapper.TTitleMapper;
import com.ruoyi.teacher.domain.TTitle;
import com.ruoyi.teacher.service.ITTitleService;

/**
 * 职称信息Service业务层处理
 * 
 * @author xiangzy
 * @date 2022-05-08
 */
@Service
public class TTitleServiceImpl implements ITTitleService 
{
    @Autowired
    private TTitleMapper tTitleMapper;

    /**
     * 查询职称信息
     * 
     * @param recordid 职称信息ID
     * @return 职称信息
     */
    @Override
    public TTitle selectTTitleById(Long recordid)
    {
        return tTitleMapper.selectTTitleById(recordid);
    }

    /**
     * 查询职称信息列表
     * 
     * @param tTitle 职称信息
     * @return 职称信息
     */
    @Override
    public List<TTitle> selectTTitleList(TTitle tTitle)
    {
        return tTitleMapper.selectTTitleList(tTitle);
    }

    /**
     * 新增职称信息
     * 
     * @param tTitle 职称信息
     * @return 结果
     */
    @Override
    public int insertTTitle(TTitle tTitle)
    {
        tTitle.setCreateTime(DateUtils.getNowDate());
        return tTitleMapper.insertTTitle(tTitle);
    }

    /**
     * 修改职称信息
     * 
     * @param tTitle 职称信息
     * @return 结果
     */
    @Override
    public int updateTTitle(TTitle tTitle)
    {
        tTitle.setUpdateTime(DateUtils.getNowDate());
        return tTitleMapper.updateTTitle(tTitle);
    }

    /**
     * 批量删除职称信息
     * 
     * @param recordids 需要删除的职称信息ID
     * @return 结果
     */
    @Override
    public int deleteTTitleByIds(Long[] recordids)
    {
        return tTitleMapper.deleteTTitleByIds(recordids);
    }

    /**
     * 删除职称信息信息
     * 
     * @param recordid 职称信息ID
     * @return 结果
     */
    @Override
    public int deleteTTitleById(Long recordid)
    {
        return tTitleMapper.deleteTTitleById(recordid);
    }
}
